#include <bits/stdc++.h>
#include "../../tools/tools.h"
using namespace std;

constexpr int INF = 0x7fffffff; // 无穷大
typedef long long ll;


class Solution {
public:
    int get_level(int num1, int num2) {
        int level = 1;
        while (true) {
            if(num1 >= level) {
                num1 -= level;
                level++;
            }else break;
            if(num2 >= level) {
                num2 -= level;
                level++;
            }else break;
        }
        return level - 1;
    }

    int maxHeightOfTriangle(int red, int blue) {
        return max(get_level(red, blue), get_level(blue, red));
    }
};

int main(int argc, const char** argv) {
    // debug();
    return 0;
}
